<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      // map可以实现把一个数组每一项加工处理一下得到一个新的数组 映射
      const arr = [1, 2, 3, 4];
      arr.map((item) => item * 2);
    </script>
  </body>
</html>
